<template>
	<div>
		<el-date-picker
      ref="datePickerRef"
			v-model="date1"
			type="daterange"
			value-format="YYYY-MM-DD"
			format="YYYY-MM-DD"
		/>
	</div>
</template>

<script setup>
import { nextTick, onMounted, ref } from 'vue'

const date1 = ref([])
const datePickerRef = ref()

onMounted(() => {
  date1.value = ['2023-12-01', '2023-12-30']
  // 禁止时间选择面板自动弹出
  nextTick(() => {
    datePickerRef.value?.handleClose()
  })
})
</script>

<style lang="scss" scoped></style>
